/**
 * Article.java
 * cn.feigme.cms.model
 * @author Feigme 
 * 2008-4-7
 */
package cn.feigme.cms.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import cn.feigme.identity.model.User;

/**
 * @author Feigme 
 *
 */
@Entity
@Table(name="pf_cms_Article_tbl")
public class Article implements Serializable {

	private static final long serialVersionUID = 1L;

	private String id;
	private String title;
	private User user;
	private Categary categary;
	private Date createDate;
	private String summary;
	private String content;
	private Boolean source;
	private String tags;
	private Boolean enabled;
	
	
	@Id   
    @GeneratedValue(generator = "system-uuid")   
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	@ManyToOne()
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	@ManyToOne()
	public Categary getCategary() {
		return categary;
	}
	public void setCategary(Categary categary) {
		this.categary = categary;
	}
	
	@Temporal(value = TemporalType.TIMESTAMP)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@Column(columnDefinition="CHAR(1)")
	public Boolean getSource() {
		return source;
	}
	public void setSource(Boolean source) {
		this.source = source;
	}
	public String getTags() {
		return tags;
	}
	public void setTags(String tags) {
		this.tags = tags;
	}
	
	@Column(columnDefinition="CHAR(1)")
	public Boolean getEnabled() {
		return enabled;
	}
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	
}
